Optimal. Leaf size=84 \[ \cos \left (\frac {c}{2}\right ) \sqrt {a+a \cos (c+d x)} \text {CosIntegral}\left (\frac {d x}{2}\right ) \sec \left (\frac {c}{2}+\frac {d x}{2}\right )-\sqrt {a+a \cos (c+d x)} \sec \left (\frac {c}{2}+\frac {d x}{2}\right ) \sin \left (\frac {c}{2}\right ) \text {Si}\left (\frac {d x}{2}\right ) \]
[Out]
________________________________________________________________________________________
Rubi [A]
time = 0.08, antiderivative size = 84, normalized size of antiderivative = 1.00, number of steps
used = 4, number of rules used = 4, integrand size = 18, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.222, Rules used = {3400, 3384,
3380, 3383} \begin {gather*} \cos \left (\frac {c}{2}\right ) \text {CosIntegral}\left (\frac {d x}{2}\right ) \sec \left (\frac {c}{2}+\frac {d x}{2}\right ) \sqrt {a \cos (c+d x)+a}-\sin \left (\frac {c}{2}\right ) \text {Si}\left (\frac {d x}{2}\right ) \sec \left (\frac {c}{2}+\frac {d x}{2}\right ) \sqrt {a \cos (c+d x)+a} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 3380
Rule 3383
Rule 3384
Rule 3400
Rubi steps
\begin {align*} \int \frac {\sqrt {a+a \cos (c+d x)}}{x} \, dx &=\left (\sqrt {a+a \cos (c+d x)} \csc \left (\frac {1}{2} \left (c+\frac {\pi }{2}\right )+\frac {\pi }{4}+\frac {d x}{2}\right )\right ) \int \frac {\sin \left (\frac {1}{2} \left (c+\frac {\pi }{2}\right )+\frac {\pi }{4}+\frac {d x}{2}\right )}{x} \, dx\\ &=\left (\cos \left (\frac {c}{2}\right ) \sqrt {a+a \cos (c+d x)} \csc \left (\frac {1}{2} \left (c+\frac {\pi }{2}\right )+\frac {\pi }{4}+\frac {d x}{2}\right )\right ) \int \frac {\cos \left (\frac {d x}{2}\right )}{x} \, dx-\left (\sqrt {a+a \cos (c+d x)} \csc \left (\frac {1}{2} \left (c+\frac {\pi }{2}\right )+\frac {\pi }{4}+\frac {d x}{2}\right ) \sin \left (\frac {c}{2}\right )\right ) \int \frac {\sin \left (\frac {d x}{2}\right )}{x} \, dx\\ &=\cos \left (\frac {c}{2}\right ) \sqrt {a+a \cos (c+d x)} \text {Ci}\left (\frac {d x}{2}\right ) \sec \left (\frac {c}{2}+\frac {d x}{2}\right )-\sqrt {a+a \cos (c+d x)} \sec \left (\frac {c}{2}+\frac {d x}{2}\right ) \sin \left (\frac {c}{2}\right ) \text {Si}\left (\frac {d x}{2}\right )\\ \end {align*}
________________________________________________________________________________________
Mathematica [A]
time = 0.06, size = 55, normalized size = 0.65 \begin {gather*} \sqrt {a (1+\cos (c+d x))} \sec \left (\frac {1}{2} (c+d x)\right ) \left (\cos \left (\frac {c}{2}\right ) \text {CosIntegral}\left (\frac {d x}{2}\right )-\sin \left (\frac {c}{2}\right ) \text {Si}\left (\frac {d x}{2}\right )\right ) \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [F]
time = 0.04, size = 0, normalized size = 0.00 \[\int \frac {\sqrt {a +a \cos \left (d x +c \right )}}{x}\, dx\]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [C] Result contains complex when optimal does not.
time = 0.55, size = 61, normalized size = 0.73 \begin {gather*} -\frac {1}{2} \, {\left ({\left (\sqrt {2} E_{1}\left (\frac {1}{2} i \, d x\right ) + \sqrt {2} E_{1}\left (-\frac {1}{2} i \, d x\right )\right )} \cos \left (\frac {1}{2} \, c\right ) - {\left (i \, \sqrt {2} E_{1}\left (\frac {1}{2} i \, d x\right ) - i \, \sqrt {2} E_{1}\left (-\frac {1}{2} i \, d x\right )\right )} \sin \left (\frac {1}{2} \, c\right )\right )} \sqrt {a} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [F(-2)]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {Exception raised: TypeError} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \int \frac {\sqrt {a \left (\cos {\left (c + d x \right )} + 1\right )}}{x}\, dx \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [C] Result contains higher order function than in optimal. Order 9 vs. order
4.
time = 0.46, size = 166, normalized size = 1.98 \begin {gather*} -\frac {\sqrt {2} {\left (\Re \left ( \operatorname {Ci}\left (\frac {1}{2} \, d x\right ) \right ) \mathrm {sgn}\left (\cos \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )\right ) \tan \left (\frac {1}{4} \, c\right )^{2} + \Re \left ( \operatorname {Ci}\left (-\frac {1}{2} \, d x\right ) \right ) \mathrm {sgn}\left (\cos \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )\right ) \tan \left (\frac {1}{4} \, c\right )^{2} + 2 \, \Im \left ( \operatorname {Ci}\left (\frac {1}{2} \, d x\right ) \right ) \mathrm {sgn}\left (\cos \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )\right ) \tan \left (\frac {1}{4} \, c\right ) - 2 \, \Im \left ( \operatorname {Ci}\left (-\frac {1}{2} \, d x\right ) \right ) \mathrm {sgn}\left (\cos \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )\right ) \tan \left (\frac {1}{4} \, c\right ) + 4 \, \mathrm {sgn}\left (\cos \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )\right ) \operatorname {Si}\left (\frac {1}{2} \, d x\right ) \tan \left (\frac {1}{4} \, c\right ) - \Re \left ( \operatorname {Ci}\left (\frac {1}{2} \, d x\right ) \right ) \mathrm {sgn}\left (\cos \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )\right ) - \Re \left ( \operatorname {Ci}\left (-\frac {1}{2} \, d x\right ) \right ) \mathrm {sgn}\left (\cos \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )\right )\right )} \sqrt {a}}{2 \, {\left (\tan \left (\frac {1}{4} \, c\right )^{2} + 1\right )}} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Mupad [F]
time = 0.00, size = -1, normalized size = -0.01 \begin {gather*} \int \frac {\sqrt {a+a\,\cos \left (c+d\,x\right )}}{x} \,d x \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________